1. Field of the Invention
The present invention relates to an information processing apparatus, a communication apparatus, and a program. More particularly, the invention relates to an information processing apparatus, a communication apparatus, and a program preferably used for carrying out an additional registration process whereby a new region is additionally registered (created) on a memory of the information processing apparatus in accordance with instructions from the communication apparatus.
2. Description of the Related Art
Usually, during their production stage, IC (integrated circuit) cards such as Felica (registered trademark) card have a memory area therein initialized typically through physical formatting. An initial registration process is then performed on the initialized memory area so as to register (create) area regions as well as service regions in the area.
As shown illustratively in FIG. 1, the initial registration process involves first creating an area region A0 in the memory area of the IC card, followed by an area region A1 created as a lower layer under the area region A0, and by a service region S11 under the area region A1. The area regions each refer to a region that allows either another area region or a service region to be created as a lower layer thereunder.
Each area region is defined by area definition information stored in the memory area of the IC card. When such area definition information is written to the memory area of the IC card, a corresponding area region is crated in the memory area.
The area definition information is information which includes an area range indicating the range of the corresponding area region found in the memory area, an area code for uniquely identifying the area region, an area key for creating an authentication key used for authentication purposes upon access to the area region, a key version of the area key, and an allocation size indicating the size allocated to the area region.
The service region refers to a memory area that stores user data (e.g., electronic money) necessary for offering the user of the IC card a predetermined service (e.g., payment by electronic money). The service region is defined by service definition information stored in the memory area of the IC card. When such service definition information is written to the memory area of the IC card, a corresponding service region is created in the memory area.
The service definition information is information which includes a service code for uniquely identifying the corresponding service area (found in the memory area), a service key for generating an authentication key used for authentication purposes upon access to the service region, a key version of the service key, and an allocation size indicating the size allocated to the service region.
The user may have the user data stored in the service region S11 of the IC card (in which the service region S11 was created by the initial registration process) for a read or a write operation by holding the IC card over a reader/writer or like equipment offering the service in question. More specifically, if the IC card is utilized as part of an electronic money system, the user may get the IC card charged with prepaid money or have the purchase price of a product deducted from the prepaid money.
It might happen that the user wants to receive a new service using the same IC card. For example, the user may wish to add an electronic money service or a commuter ticket service to the IC card currently used as an identification card. If that is the case, regions corresponding to the newly added service need to be created anew in the memory area of the IC card.
In that case, as shown in FIG. 1, an additional registration process is carried out in a manner creating an area region A2 as a lower layer under the previously created area region A0, an area region A21 under the area region A2, and a service region S211 under the area region A21.
While the additional registration process is underway, the ongoing process might be stopped halfway illustratively because of a disruption of power supply to the IC card. In particular, if the IC card is a so-called noncontact type IC card powered by electromagnetic waves coming from a reader/writer, there is a higher possibility that power supply can be disrupted than if the IC card is a contact type IC card powered via a connection terminal, whereby the additional registration process tends to be stopped.
If the additional registration process is stopped halfway, it might happen that some regions have yet to be created while others have already been created. For example, the area region A2 may have been created but the area regions A21 and service region S211 thereunder have yet to be created.
Usually, if the initial registration process is stopped halfway illustratively because of a disruption of power supply to the IC card, the memory area of the IC card is initialized back to the state prior to the additional registration process. The initial registration process is then carried out again.
Similarly, if the additional registration process is stopped halfway, the memory area of the IC card may conceivably be initialized back to the state prior to the additional registration process (i.e., a state in which the area regions A0 and A1 as well as the service region S11 are registered) as in the case of the initial registration process. Then the additional registration process may be carried out again.
However, if the memory area of the IC card were initialized, not only the regions already created during the additional registration process (e.g., area region A2) but also the area regions A0 and A1 as well as the service region S11 created during the initial registration process would be deleted.
In the case of the IC chip mounted on a mobile phone (i.e., an IC chip offering functions equivalent to those of the above-described IC card), there exists a particular region registration method. According to this method, when new area regions A2 and A21 as well as a service region S211 are to be added to the IC chip, the area definition information and service definition information associated with these regions are all saved temporarily into a volatile memory of the mobile phone so that the saved information will later be moved altogether from the volatile memory into the memory area of the chip for registration.
There also exist techniques whereby, immediately before the additional registration process is stopped halfway, the regions about to be created in the memory area of the IC card are compared with the regions already created therein. According to the techniques, the result of the comparison is used as the basis for determining which regions were stopped halfway in their creation during the additional registration process. One such determination technique is disclosed illustratively in Japanese Patent Laid-open No. 2005-242553.